﻿@model VfAccountApps.Domain.Models.budget_info

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Expense Data Entry</legend>

        @Html.HiddenFor(model => model.budget_info_id)
        @Html.HiddenFor(model => model.entry_date)

        <div id="left-column">
        
            <div class="editor-label">
                @Html.LabelFor(model => model.sap_info_id, "Accoun Sap")
            </div>
            <div class="editor-field">
                @Html.DropDownList("sap_info_id", String.Empty)
                @Html.ValidationMessageFor(model => model.sap_info_id)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.date, "Date")
            </div>
            <div class="editor-field">
                @Html.TextBox("date", Model.date.ToString("dd-MMM-yyy") ,new { @class = "dateTimePicker", @readonly = "readonly" })
                @Html.ValidationMessageFor(model => model.date)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.unit, "Unit")
            </div>
            <div class="editor-field">
                @Html.DropDownList("unit", string.Empty)
                @Html.ValidationMessageFor(model => model.unit)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.section, "Section")
            </div>
            <div class="editor-field">
                @Html.DropDownList("section", string.Empty)
                @Html.ValidationMessageFor(model => model.section)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.description, "Description")
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.description)
                @Html.ValidationMessageFor(model => model.description)
            </div>

        </div>

        <div id="right-column">
            
            <div class="editor-label">
                @Html.LabelFor(model => model.expense_amount, "Expense Amount")
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.expense_amount)
                @Html.ValidationMessageFor(model => model.expense_amount)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.budgeted_amount, "Budgeted Amount")
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.budgeted_amount)
                @Html.ValidationMessageFor(model => model.budgeted_amount)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.remark, "Remark")
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.remark)
                @Html.ValidationMessageFor(model => model.remark)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.reference_no, "Reference No")
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.reference_no)
                @Html.ValidationMessageFor(model => model.reference_no)
            </div>

            <p>
                <input type="submit" value="Save" />
            </p>

        </div>
        
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
